#ifndef FIR_FIRAIPLUGINMANAGER_H_
#define FIR_FIRAIPLUGINMANAGER_H_

#include <vector>
#include <string>
#include <Windows.h>
#include "iaiplugin.h"

class FIRAIPluginManager;

// some definitions
typedef std::vector<std::wstring>	PluginPathList;
typedef std::vector<HMODULE>		PluginModuleList;
typedef IAIPlugin* (*CREATEPLUGIN)(FIRAIPluginManager*);

class FIRAIPluginManager {
private:
    static FIRAIPluginManager instance;
    PluginPathList plugin_path_list;
    PluginModuleList plugin_module_list;


public:
    static FIRAIPluginManager& Instance();
    void SearchAIPlugins();
    PluginPathList GetPluginPathList();
    std::wstring GetFileNameFromPath(std::wstring path) const;
    IAIPlugin* RegisterAIPlugin(std::wstring path);
    void FreeAllLibrary();

private:
    std::wstring GetPluginDirectoryPath(void) const;


};

#endif // FIR_FIRAIPLUGINMANAGER_H_